package com.java.tutorials.spring.springInAction4th.chapter02.autoconfig;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class CDPlayer1 implements MediaPlayer1 {
    private CompactDisc1 cd;

    @Autowired
    public CDPlayer1(CompactDisc1 cd) {
        this.cd = cd;
    }

    public void play() {
        cd.play();
    }

}
